<?php
function print_vars ($sVar, $bBoth = false)
{
	echo '<pre>';

	if ($bBoth == true)
	{
		print_r ($_SERVER);
		print_r ($_GET);
		print_r ($_POST);
		print_r ($_SESSION);

		if (isset ($sVar) && !empty ($sVar))
		{
			print_r ($sVar);
		}
	}
	elseif ($bBoth == false)
	{
		if (isset ($sVar) && !empty ($sVar))
		{
			print_r ($sVar);
		}
	}
	
	echo '</pre>';
}

function print_var ($sVar, $bBoth = false)
{
	print_vars ($sVar, $bBoth);
}